package com.biz.primus.model.oms.vo;


import com.biz.primus.model.oms.enums.returns.ReturnState;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AccessLevel;
import lombok.Data;
import lombok.experimental.FieldDefaults;

import java.time.LocalDateTime;
import java.util.Collections;
import java.util.List;


/**
 * @author  LGJ
 * @date  2017/11/16
 */
@Data
@FieldDefaults(level = AccessLevel.PRIVATE)
@ApiModel("oms退单主体")
public class OmsOrderReturnVo {


	@ApiModelProperty("oms收到退单的时间")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	LocalDateTime omsCreateTime;

	@ApiModelProperty("退单编号")
	String code;

	@ApiModelProperty("退单原订单")
	String originOrderCode;

	@ApiModelProperty("订单来源")
	String orderSource;

	@ApiModelProperty("退单来源")
	String returnSource;

	@ApiModelProperty("渠道编号")
	String channel;

	@ApiModelProperty("订单渠道文本描述,作为返回值时会有值")
	String channelText;

	@ApiModelProperty("门店编码")
	String depot;

	@ApiModelProperty("已退金额")
	Integer liquidated = 0;

	@ApiModelProperty("退单总金额")
	Integer amount = 0;

	@ApiModelProperty("运费金额")
	Integer freightAmount = 0;

	@ApiModelProperty("用户id")
	Long userId;

	@ApiModelProperty("用户备注/用户退货说明")
	String remark;

	@ApiModelProperty("客服备注(客户不可见)")
	String selfRemark;

	@ApiModelProperty("退单项")
	List<OmsItemVo> items = Collections.emptyList();

	@ApiModelProperty("退款记录")
	List<OmsPaymentVo> payments = Collections.emptyList();

	@ApiModelProperty(value="退款状态",allowableValues = "begin, finished")
	ReturnState returnState;

	@ApiModelProperty("是否需要退款")
	boolean needRefund;

	@ApiModelProperty("如果returnState==finished, 需要填写退货收货人编号")
	String receiver;

	@ApiModelProperty("如果returnState==finished, 需要填写退货收货时间")
	LocalDateTime receiveTime;




}
